package com.chapter01exercise.homework05;

/**
 * @Author 小闽
 * @Date 2024/8/16 16:37
 * @PackageName: com.chapter01exercise.homework5
 * @ClassName: Employee
 * @Description: 员工类
 * @Version 1.0
 */
public class Employee {
    private String name;
    private double basic_salary;
    private int sal_month = 12;

    /**
     * 构造器
     * @param name
     * @param basic_salary
     */
    public Employee(String name, double basic_salary) {
        this.name = name;
        this.basic_salary = basic_salary;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getBasic_salary() {
        return basic_salary;
    }

    public void setBasic_salary(double basic_salary) {
        this.basic_salary = basic_salary;
    }

    public int getSal_month() {
        return sal_month;
    }

    public void setSal_month(int sal_month) {
        this.sal_month = sal_month;
    }
    /**
     * 计算全年工资的方法
     */
    public double countAnnualSalary(){
        return basic_salary * sal_month;
    }
}
